package com.demo.service;

import com.demo.dao.UserMapper;
import com.demo.pojo.User;

public class UserServiceImpl implements UserService{
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public int deleteUser(int userid) {
        return userMapper.deleteUser(userid);
    }

    @Override
    public User selectUserByName(String username) {
        return userMapper.selectUserByName(username);
    }
}
